const mongoose = require('mongoose');
let commoditySchema = new mongoose.Schema({
    name: String,//商品名称
    oldPrice: String,//商品原价
    newPrice: String,//商品现价
    freight: String,//运费
    images: Array,//商品图片
    color: String,//商品颜色
    size: String,//商品大小
    fit: String,//商品适用人群
    brand: String,//品牌
    intro: String,//商品介绍
    stock: String,//商品库存
    types: {//商品类型
        type: mongoose.Schema.Types.ObjectId,
        ref: 'classifyModel'
    }

});

module.exports = mongoose.model('commodModel', commoditySchema, ' commodity');